//
//  PublicViewController.h
//  TestApp
//
//  Created by 杨志涛 on 15/9/1.
//  Copyright (c) 2015年 杨志涛. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "AppConfig.h"
#import "MBProgressHUD.h"
#import "ParseJson.h"
#import "StaticMethod.h"
#import "UIImageView+WebCache.h"
#import "BeseHttpClient.h"
#import "MJRefresh.h"



#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v)  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
//#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)
//#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)

@interface PublicViewController : UIViewController<MBProgressHUDDelegate,UIAlertViewDelegate>
{
    NSUserDefaults *userDefaults;
    ParseJson      *parseJson;
    
    MBProgressHUD *progressHUD;
    Boolean isShowProgressHUD;
    Boolean isShowProgressGIF;
}
@property (nonatomic ,retain)NSUserDefaults *userDefaults;
@property (nonatomic,readonly) Boolean isShowProgressHUD;
@property (nonatomic,readonly) Boolean isShowProgressGIF;

@property (nonatomic,strong) NSTimer* countDownTimerNEW;// 倒计时
@property (nonatomic) NSInteger countDownCountNEW;// 倒计时


- (void)showMessage:(NSString *)string time:(float)delay;
- (void)showProgressHUD;
- (void)hideProgressHUD;
- (void)showProgressHUD:(NSString*)msg;
-(void)showProgressGIF:(NSData*)gifData;
-(void)hideProgressGIF;
/*对话框的创建*/
- (void)showAlert       :(NSString *)message;
- (void)showAlertForSelf:(NSString *)message  :(int)tag;
- (void)showAlertSelect :(NSString *)message  :(int)tag;
- (void)showAlertSelectWithTitle:(NSString *)message title:(NSString*)title
                         leftBtn:(NSString*)leftBtn  rightBtn:(NSString*)rightBtn :(int)tag;
- (void)showAlertWithTextField:(NSString *)message title:(NSString*)title
                       leftBtn:(NSString*)leftBtn  rightBtn:(NSString*)rightBtn :(int)tag;
/*退出登录调用*/
-(void)loginOut;
/*公共解析成功与否判断字符*/
-(BOOL)requestResult:(NSDictionary*)dictionary;
/*公共解析成功返回的msg*/
-(NSString*)requestMsg:(NSDictionary*)dictionary;
/*验证码倒计时正常显示状态*/
- (UIButton*)DownTimeBtnNormal:(UIButton*)codebtn;
/* 验证码倒计时动态显示状态*/
- (UIButton*)DownTimeBtnGoon:(UIButton*)codebtn countSecond:(NSInteger)countSecond;
/*红色背景白底的字体，设置确定按钮样式的公用方法*/
- (UIButton*)setSendBtn:(UIButton*)sendBtn;
/*白色背景红色的字体设置确定按钮样式的公用方法*/
- (UIButton*)setSendBtn2:(UIButton*)sendBtn;

@end
